#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
int main(int argc,const char*argv[])
{
	pid_t ret=-1;
	printf("hello world\n");
	ret=fork();
	if(ret>0)
	{
		printf("I am 父进程\n");
		printf("我的父进程：%d\t我的进程号：%d\n",getppid(),getpid());
	}
	else if(ret==0)
	{
		printf("I an 子进程\n");
		printf("我的父进程：%d\t我的进程号：%d\n",getppid(),getpid());
	}
	while(1);
	return 0;
}
